﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DatabaseUserTest.Controller;

namespace Admin
{
    public partial class Form1 : Form
    {
        private DestinationCTRL destctrl = new DestinationCTRL();
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string name;
            string country;
            if (richTextBox1.Text != null)
            {
                name = richTextBox1.Text;

                if (richTextBox1.Text != null)
                {
                    country = richTextBox2.Text;
                    if (destctrl.AddDestination(name, country))
                    {
                        //destctrl.AddDestination(name, country);
                        label5.Text = "Nice job";
                    }
                    
                }
            }

        }
    }
}
